import http from '@/utils/request.ts'
import type {GetBaseCategoryRes, GetListReq, GetListRes} from "@/api/home/types.ts";


enum HomeApi {
  GET_BASE_CATEGORY= '/api/getBaseCategoryList',
  GET_LIST_DATA= '/api/list'
}

/**
 * 获取首页三级列表
 */
export const getBaseCategoryList=()=>http.get<any,GetBaseCategoryRes>(HomeApi.GET_BASE_CATEGORY)


/**
 * 获取商品列表
 * @param data
 */
export const getListData = (data:GetListReq) => http.post<any, GetListRes>(HomeApi.GET_LIST_DATA,data)
